<span id='print'>
<div class="tableform">
<div class="division">
<{if(!isset($process_name))}><{assign var=process_name value='入库'}><{/if}>
<h4><{$process_name}>单</h4>
<table width="100%" border="0" class="gridlist">
  <tr>
    <td>
    <table width="100%" border="0">
      <tr>
        <th>金额总计:</th>
        <td><{$eo.detail.product_cost}></td>
        <th>经办人</th>
        <td><{$eo.detail.oper}></td>
      </tr>
      <tr>
        <th>到货仓库:</th>
        <td><{$eo.branch_name}></td>
        <th>供应商:</th>
        <td><{$eo.supplier_name}></td>
      </tr>
      <tr>
        <th><{$process_name}>日期:</th>
        <td><{$eo.detail.create_time|date_format:"%Y-%m-%d"}></td>
        <th><{$process_name}>单编号:</th>
        <td><{$eo.detail.iso_bn}></td>
      </tr>
      <tr>
        <th colspan="2"><{$process_name}>单备注:</th>
        <td colspan="2"><{$eo.detail.memo}></td>
      </tr>
    </table></td>
  </tr>
</table>
</div>

<div class="division">
<h4><{$process_name}>商品明细</h4>
<table border="0" cellspacing="0" cellpadding="0" class="gridlist">
<thead>
      <tr>
        <th style="width:30%">商品名称</th>
        <th style="width:10%">货号</th>
        <th style="width:10%">货位</th>
        <th style="width:5%">单位</th>
        <th style="width:10%">数量</th>
        <th style="width:8%" class="price">价格</th>
        </tr>
        </thead>
        <tbody>
	  <{foreach from=$eo.items item=items}>
      <tr>
        <td><{$items.product_name}></td>
        <td><{$items.bn}></td>
        <td><{$items.store_position}></td>
        <td><{$items.unit}></td>
        <td><{$items.nums}></td>
        <td style="font-weight:bold;" class="price"><{$items.price}></td>
        </tr>
	  <{/foreach}>
	 </tbody>
</table>
</div>
</div>
</span>
<script language="javascript">
     function printme()
     {
         var print = this.document.getElementById("print").innerHTML;
         print = print +"<br/>";
     print = print +'<SCRIPT language=javascript> function printView(){hidden();document.all.WebBrowser.ExecWB(7,1); } function print(){hidden();document.all.WebBrowser.ExecWB(6,6)}function pageSetup(){hidden();document.all.WebBrowser.ExecWB(8,1);}function hidden(){document.all("printView").style.display="none"; document.all("print").style.display="none";  document.all("pageSetup").style.display="none";}<\/script>';
        print = print + "<OBJECT   classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2   height=21   id=WebBrowser   width=87></OBJECT><input  id = print name=Button   onClick='window.print()'   type=button   value=直接打印> ";
        var newWindow = window.open();
        newWindow.document.open("text/html");
        newWindow.document.write(print);
        newWindow.document.close();
   }
</script>
